@layout("/common/_container.html",{js:["/assets/modular/discount/discount.js"]}){

<div class="layui-body-header">
    <span class="layui-body-header-title">优惠券管理</span>
</div>
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-sm12 layui-col-md12 layui-col-lg12">
            <div class="layui-card">
                <div class="layui-card-body">
                    <div class="layui-form toolbar">
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <input id="name" class="layui-input" type="text" placeholder="名称"/>
                            </div>
                            <div class="layui-inline">
                                <select name="商品状态"  id="recordStatus">
                                    <option value="">全部状态</option>
                                    <option value="0">停用</option>
                                    <option value="1">启用中</option>
                                    <option value="2">过期</option>
                                </select>
                            </div>
                            <div class="layui-inline">
                                <input id="effectiveTime" class="layui-input" type="text" placeholder="该时间有效优惠券"/>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">满减额度</label>
                                <div class="layui-input-inline" style="width: 100px;">
                                    <input type="number" name="leastPriceMin" id="leastPriceMin" placeholder="￥" autocomplete="off" class="layui-input">
                                </div>
                                <div class="layui-form-mid">-</div>
                                <div class="layui-input-inline" style="width: 100px;">
                                    <input type="number" name="leastPriceMax" id="leastPriceMax"  placeholder="￥" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">减免额度</label>
                                <div class="layui-input-inline" style="width: 100px;">
                                    <input type="number" name="discountPriceMin" id="discountPriceMin" placeholder="￥" autocomplete="off" class="layui-input">
                                </div>
                                <div class="layui-form-mid">-</div>
                                <div class="layui-input-inline" style="width: 100px;">
                                    <input type="number" name="discountPriceMax" id="discountPriceMax"  placeholder="￥" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <button id="btnSearch" class="layui-btn icon-btn"><i class="layui-icon">&#xe615;</i>搜索</button>
                                <button id="btnAdd" class="layui-btn icon-btn"><i class="layui-icon">&#xe654;</i>添加</button>
                               <!-- <button id="btnExp" class="layui-btn icon-btn"><i class="layui-icon">&#xe67d;</i>导出</button>-->
                            </div>
                        </div>
                    </div>
                    <table class="layui-table" id="discountTable" lay-filter="discountTable"></table>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/html" id="typeTpl">
    {{# if(d.type==1){ }}
        <span>满减券</span>
    {{#  }else{ }}
        <span>优惠券</span>
    {{# } }}
</script>

<script type="text/html" id="statusTpl">
    {{# if(d.recordStatus != 2){ }}
        <input type="checkbox" lay-filter="recordStatus" value="{{d.id}}" lay-skin="switch" lay-text="启用|停用" {{d.recordStatus=='1'?'checked':''}}/>
    {{# }else{ }}
        <span>已过期</span>
    {{# } }}

</script>
<script type="text/html" id="tableBar">
    <a class="layui-btn  layui-btn-xs" lay-event="edit">编辑</a>
    <!--<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete">删除</a>-->
</script>
@}